package com.gzc.just.play.last.war.robotclient.config;

import com.gzc.just.play.last.war.common.annotation.MessageDeserializer;
import com.gzc.just.play.last.war.protobuf.bs.bstogc.BSToGC;
import com.gzc.just.play.last.war.protobuf.gc.gctobs.GCToBS;
import com.gzc.just.play.last.war.protobuf.gs.gstogc.GSToGC;
import com.gzc.just.play.last.war.protobuf.ls.lstogc.LSToGC;
import org.springframework.stereotype.Component;

/**
 * Robot Client 消息反序列化器配置
 *
 * 使用声明式注解方式配置所有消息的反序列化器。
 */
@Component
@MessageDeserializer(
    messageId = 512, // eMsgToGCFromLS_AskLoginRet
    messageType = LSToGC.LoginResult.class,
    module = "robot-client",
    name = "LoginResultDeserializer"
)
@MessageDeserializer(
    messageId = 513, // eMsgToGCFromLS_NotifyServerBSAddr
    messageType = LSToGC.ServerBSAddr.class,
    module = "robot-client",
    name = "ServerBSAddrDeserializer"
)
@MessageDeserializer(
    messageId = 204, // eMsgToGCFromBS_ClinetLoginCheckRet
    messageType = BSToGC.ClinetLoginCheckRet.class,
    module = "robot-client",
    name = "ClinetLoginCheckRetDeserializer"
)
@MessageDeserializer(
    messageId = 203, // eMsgToGCFromBS_AskGateAddressRet
    messageType = BSToGC.AskGateAddressRet.class,
    module = "robot-client",
    name = "AskGateAddressRetDeserializer"
)
@MessageDeserializer(
    messageId = 2, // eMsgToGCFromGS_NotifyUserBaseInfo
    messageType = GSToGC.UserBaseInfo.class,
    module = "robot-client",
    name = "UserBaseInfoDeserializer"
)
@MessageDeserializer(
    messageId = 1002, // Heartbeat Response
    messageType = byte[].class,
    module = "robot-client",
    name = "HeartbeatResponseDeserializer"
)
public class RobotClientDeserializerConfig {
}
